<el-dialog class="dialogStyleBase" :title="mixinEdit_editTitle" width="1300px" :visible.sync="mixinEdit_editVisible"
    :before-close="hideBox" append-to-body>

    <div slot="title">
        <div class="head">
            <div class="title">{{mixinEdit_editTitle}}</div>
            <div :class="'tabs '+loading">
                <div :class="'dd '+(item.value==stepIndex)" :key="item.value" v-for="item in tabs"
                    @click="setStep(item.value)"><i :class="item.icon"></i>{{item.title}}</div>
            </div>
        </div>
    </div>
    <div class="main" v-loading="loading">

        <LayoutCell v-show="stepIndex==0">
            <LayoutCellItem title="基本信息">
                <GoodsEditBase :appWindow="appWindow" ref="GoodsEditBase" @change="changeBase"></GoodsEditBase>
            </LayoutCellItem>
        </LayoutCell>

        <LayoutCell v-show="stepIndex==1">
            <LayoutCellItem title="配送信息">
                <GoodsEditDeliver :appWindow="appWindow" ref="GoodsEditDeliver" @change="changeDeliver"
                    @getTemplate="getTemplate" :templateOptions="templateOptions"
                    :productType="editData.base?editData.base.productType:1">
                </GoodsEditDeliver>
            </LayoutCellItem>
        </LayoutCell>

        <LayoutCell v-show="stepIndex==2">
            <LayoutCellItem title="规格信息">
                <GoodsEditSpecs :appWindow="appWindow" v-if="editData.base" :categoryId="editData.base.categoryId"
                    :templateOptions="templateOptions"
                    :freightTemplateId="editData.deliver.isStoreDelivery==1?editData.deliver.freightTemplateId:''"
                    :subCategoryId="editData.base.subCategoryId" ref="GoodsEditSpecs" @change="changeSpecs">
                </GoodsEditSpecs>
            </LayoutCellItem>
        </LayoutCell>
        <LayoutCell v-show="stepIndex==3">
            <LayoutCellItem title="属性参数">
                <GoodsEditGroup :appWindow="appWindow" ref="GoodsEditGroup" @change="changeGroup"></GoodsEditGroup>
                <!-- {{editData.attr}} -->
                <GoodsEditAttr :appWindow="appWindow" v-if="editData.base" :categoryId="editData.base.categoryId"
                    :subCategoryId="editData.base.subCategoryId" ref="GoodsEditAttr" @change="changeAttr">
                </GoodsEditAttr>
                <!-- {{editData.param}} -->
                <GoodsEditParam :appWindow="appWindow" v-if="editData.base" :categoryId="editData.base.categoryId"
                    :subCategoryId="editData.base.subCategoryId" ref="GoodsEditParam" @change="changeParam">
                </GoodsEditParam>
                <!-- {{editData.serve}} -->
                <GoodsEditServe :appWindow="appWindow" v-if="editData.base" :categoryId="editData.base.categoryId"
                    :subCategoryId="editData.base.subCategoryId" ref="GoodsEditServe" @change="changeServe">
                </GoodsEditServe>
            </LayoutCellItem>
        </LayoutCell>
        <LayoutCell v-show="stepIndex==4">
            <LayoutCellItem title="其他选项">
                <GoodsEditOther :appWindow="appWindow" ref="GoodsEditOther" @change="changeOther"></GoodsEditOther>
            </LayoutCellItem>
        </LayoutCell>
        <LayoutCell v-show="stepIndex==5">
            <LayoutCellItem title="商品详情">
                <GoodsEditHtml :appWindow="appWindow" ref="GoodsEditHtml" @change="changeHtml"></GoodsEditHtml>
            </LayoutCellItem>
        </LayoutCell>

    </div>
    <!-- <div v-show="!load.all" style="text-align: center;line-height:50px;">加载中</div> -->

    <div slot="footer">
        <el-row>
            <el-col :span="12" style="text-align: left;">
                <el-button @click="hideBox()">取 消</el-button>
            </el-col>
            <el-col :span="12">
                
                <el-button type="primary" @click="submit()">保存</el-button>
            </el-col>
        </el-row>


    </div>


</el-dialog>